<template>
  <svg class="__icon" aria-hidden="true">
    <use :xlink:href="fullName"></use>
  </svg>
</template>

<script lang="ts">
import { Options, Vue } from "vue-class-component";
@Options({
  props: {
    name: String,
  },
  computed: {
    fullName() {
      return `#icon_${this.name}`;
    },
  },
})
export default class SvgIcon extends Vue {}
</script>

<style scoped lang="scss">
.__icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
</style>
